package cn.org.qary.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;


/**
 * 商品，描述商品的属性
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Product {

  @Id
  @KeySql(useGeneratedKeys = true)
  private Integer id;
  private String name;
  private String price;
  /**
   * 库存
   */
  private Integer inventory;
  /**
   * 商品图片路径
   */
  private String image;
  /**
   * 商品详情
   */
  private String details;
  /**
   * 商品所属的二级分类
   */
  @Column(name = "secondary_type_id")
  private Integer secondaryTypeId;


}
